"auto";
function swpdown(){
    sleep(2000);
    swipe(520,1800 ,520 ,1000,800 );
    sleep(500);
    swipe(520,1910 ,520 ,5,1500 );
    sleep(2000);

}
function get_cancel(){   //获取取消控件
    let object = text("action_list").findOnce();
    if (object != null) {     
    return true ;   //弹出了按钮
        
    } else {
    return false;   //正常
    }
}
while(true){
id("recycler_view").className("androidx.recyclerview.widget.RecyclerView").scrollable(true).findOne().children().forEach(child => {
    var target = child.findOne(id("btn_follow"));
    
    target.click();
    sleep(2000);
    let ck=get_cancel();
    if(ck==true){
        click(500,2220); //点击取消
        sleep(2000);
       
    }
    //sleep(3000);
    });
    swpdown();

}
